Skip to content

use webpack to create a browser-ready version of the library#156

Merged
mfrisbey merged 2 commits intomasterfrom
webpack
May 30, 2024
Merged

use webpack to create a browser-ready version of the library#156
mfrisbey merged 2 commits intomasterfrom
webpack

Conversation

@mfrisbey
Copy link
Copy Markdown
Contributor

@mfrisbey mfrisbey commented May 29, 2024

Description

Updates the library's es2015 build process so that it uses webpack instead of babel directly. Introduced a basic webpack configuration that uses polyfills for various node.js-only modules required by the library.

Also updates various dependencies to more secure versions, and changes the CI so that it runs tests on non-deprecated versions of node.js.

Note that I'll be releasing this as a breaking change, since the supported versions of node.js have changed, and because the output in the es2015 build directory has changed.

Fixes #157

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@mfrisbey mfrisbey requested review from pheenomenon and tcallsen May 29, 2024 17:47
@mfrisbey mfrisbey marked this pull request as ready for review May 29, 2024 17:48
@pheenomenon
Copy link
Copy Markdown
Contributor

The ITs & dependent tests are failing. Likely unrelated.

@tcallsen
Copy link
Copy Markdown
Contributor

Ok, I've retried the ITs a couple times now.

@mfrisbey
Copy link
Copy Markdown
Contributor Author

It's hard to parse the circleci output, but for the dependent_module_tests, I see things like this:

error: Could not init action on container (POST http://0.0.0.0:32790/init: responded with error: Initialization has failed due to: Error: Cannot find module 'node:os'
Require stack:
- /nodejsAction/gQkgSym7/index.js
- /nodejsAction/runner.js
- /nodejsAction/src/service.js

For the integration_tests, it looks like tests are passing, but the output ends with:

Too long with no output (exceeded 10m0s): context deadline exceeded

@pheenomenon Are we ok to merge despite the errors?

@pheenomenon
Copy link
Copy Markdown
Contributor

I have created a jira to look more into it.. My initial analysis is, it's unrelated, as other open source CI had the same issue in the CI adobe/asset-compute-events-client#36.
Will take more analysis to figure out what's going on. If the merge is time critical, think it should be ok to merge.

@mfrisbey
Copy link
Copy Markdown
Contributor Author

@pheenomenon ok, thanks for looking at it. I'm planning on merging it as a breaking change, so it'll update the major version number of the library. Consumers will need to explicitly update the version, so if it ends up breaking anything it should be pretty easy to just revert while we figure things out.

I'll merge it for now, and we can revisit if there are issues. I did run all the unit tests and e2e tests locally, and they all passed. So hopefully risk is low.

@mfrisbey mfrisbey merged commit 6278554 into master May 30, 2024
@mfrisbey mfrisbey deleted the webpack branch May 30, 2024 18:36
@adobe-bot
Copy link
Copy Markdown

🎉 This PR is included in version 4.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Library causes errors in webpack

4 participants